<page-header [autoTitle]="false"></page-header>
<nz-card>
  <section class="search-section">
    <input nz-input placeholder="姓名、手机号" [(ngModel)]="keyword" class="search-item"/>
    <nz-select [(ngModel)]="type" [nzPlaceHolder]="'类型'" class="search-item" [nzAllowClear]="true">
      <nz-option
        *ngFor="let option of recordTypeOption"
        [nzLabel]="option.value"
        [nzValue]="option.key">
      </nz-option>

    </nz-select>
    <button nz-button [nzType]="'primary'" nzGhost (click)="search()"  class="search-item">
      <i class="anticon anticon-search"></i><span>搜索</span>
    </button>
  </section>
  <nz-table #nzTable [nzData]="page.content"
            [nzPageSize]="page.size"
            [nzTotal]="page.totalElements"
            [nzFrontPagination]="false"
            [(nzPageIndex)]="page.number"
            (nzPageIndexChange)="changePageNo($event)"
            [nzLoading]="isLoading">
    <thead>
    <tr>
      <th><span>序号</span></th>
      <th><span>姓名</span></th>
      <th><span>手机号</span></th>
      <th><span>类型</span></th>
      <th><span>积分</span></th>
      <th><span>操作前积分</span></th>
      <th><span>操作后积分</span></th>
      <th><span>操作时间</span></th>
      <th><span>操作</span></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of nzTable.data;let i=index">
      <td>
        {{i+1}}
      </td>
      <td>{{data.cusName}}</td>
      <td>{{data.cusPhone}}</td>
      <td>{{data.type|dicsNamePipe:recordTypeOption}}</td>
      <td>{{data.amount}}</td>
      <td>{{data.oldIntegral}}</td>
      <td>{{data.newIntegral}}</td>
      <td>{{data.saveDate}}</td>
      <td>
        <a href="javascript:void (0);" (click)="seeEntity(data)">查看详情</a>
      </td>
    </tr>
    </tbody>
  </nz-table>
</nz-card>
